feat(metrics): implement metric reader metrics#4970
Merged
lzchen merged 12 commits intoopen-telemetry:mainfrom Mar 19, 2026
Merged
feat(metrics): implement metric reader metrics#4970lzchen merged 12 commits intoopen-telemetry:mainfrom
lzchen merged 12 commits intoopen-telemetry:mainfrom
Conversation
…y-python into metrics-reader-metrics
Contributor
Author
|
Sent open-telemetry/opentelemetry-python-contrib#4332 to make genai test only read its scope |
120c3db to
3c70e2a
Compare
lzchen
reviewed
Mar 16, 2026
xrmx
reviewed
Mar 16, 2026
lzchen
reviewed
Mar 16, 2026
lzchen
reviewed
Mar 16, 2026
Contributor
|
Thanks for your contribution! Could you update the title + description to include that this PR covers specifically implementing the |
…y-python into metrics-reader-metrics
anuraaga
commented
Mar 19, 2026
xrmx
approved these changes
Mar 19, 2026
lzchen
approved these changes
Mar 19, 2026
Vitexus
pushed a commit
to Vitexus/opentelemetry-python
that referenced
this pull request
Apr 30, 2026
nicoloboschi
pushed a commit
to vectorize-io/hindsight
that referenced
this pull request
May 4, 2026
…exporter} floors so PrometheusMetricReader 0.62b1 doesn't crash startup (#1373) opentelemetry-exporter-prometheus 0.62b1 calls MetricReader.__init__(otel_component_type=…), a kwarg that opentelemetry-sdk introduced only in v1.41.0 (open-telemetry/opentelemetry-python#4970). The previous `opentelemetry-{api,sdk}>=1.20.0` / `opentelemetry-{instrumentation,exporter,semantic-conventions}>=0.41b0` / `opentelemetry-exporter-otlp-proto-http>=1.20.0` floors let pip resolve a recent exporter-prometheus against an older sdk (e.g. 1.39.x cached in a lockfile), so on hindsight-api startup metric initialisation explodes with "MetricReader.__init__() got an unexpected keyword argument 'otel_component_type'. Metrics will be disabled (using no-op collector)." Functionally hindsight stays up but /metrics is silently empty. Bumping all six otel pins to the matching 1.41.0 / 0.62b1 floor keeps pip's resolver consistent across the otel ecosystem and removes the mismatch that produces the warning. Closes #1372
liling
pushed a commit
to liling/hindsight
that referenced
this pull request
May 5, 2026
…exporter} floors so PrometheusMetricReader 0.62b1 doesn't crash startup (vectorize-io#1373) opentelemetry-exporter-prometheus 0.62b1 calls MetricReader.__init__(otel_component_type=…), a kwarg that opentelemetry-sdk introduced only in v1.41.0 (open-telemetry/opentelemetry-python#4970). The previous `opentelemetry-{api,sdk}>=1.20.0` / `opentelemetry-{instrumentation,exporter,semantic-conventions}>=0.41b0` / `opentelemetry-exporter-otlp-proto-http>=1.20.0` floors let pip resolve a recent exporter-prometheus against an older sdk (e.g. 1.39.x cached in a lockfile), so on hindsight-api startup metric initialisation explodes with "MetricReader.__init__() got an unexpected keyword argument 'otel_component_type'. Metrics will be disabled (using no-op collector)." Functionally hindsight stays up but /metrics is silently empty. Bumping all six otel pins to the matching 1.41.0 / 0.62b1 floor keeps pip's resolver consistent across the otel ecosystem and removes the mismatch that produces the warning. Closes vectorize-io#1372
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I am helping to implement SDK internal metrics
https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/
This implements the metric for metric reader collections, namely
otel.sdk.exporter.operation.duration.Similar PR in Java: open-telemetry/opentelemetry-java#8038
Similar PR in JS: open-telemetry/opentelemetry-js#6449
/cc @xrmx to help with review
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: